package com.ihr360.payroll.dao;

import com.ihr360.payroll.model.dto.salary.report.HistoryPayPeriod;
import com.ihr360.rest.reposity.SimpleRestReposity;

import java.util.List;

public interface HistoryPayPeriodRepository extends SimpleRestReposity<HistoryPayPeriod, Long> {

    HistoryPayPeriod findByCompanyIdAndSalaryPlanSalaryPlanIdAndYearAndMonth(String companyId, Long salaryPlanId, int year, int month);

    List<HistoryPayPeriod> findByCompanyIdAndSalaryPlanSalaryPlanIdInAndYearAndMonth(String companyId, List<Long> salaryPlanIdList, int year, int month);

    List<HistoryPayPeriod> findByCompanyIdAndIdIn(String companyId, List<Long> idList);

    List<HistoryPayPeriod> findByCompanyIdAndApplicationIdIn(String companyId, List<String> applicationIdList);

    HistoryPayPeriod findBySalaryPlanSalaryPlanIdAndYearAndMonth(Long salaryPlanId, int year, int month);

    List<HistoryPayPeriod> findByCompanyIdAndSalaryPlanSalaryPlanIdAndYearOrderByMonth(String companyId, Long salaryPlanId, int year);

    List<HistoryPayPeriod> findByCompanyIdAndSalaryPlanSalaryPlanIdOrderByYear(String companyId, Long salaryPlanId);



}